import { Interceptor, InterceptorInterface, Action } from 'routing-controllers';

/**
 * 局部拦截器
 */
export class PerInterceptor implements InterceptorInterface {
  intercept(action: Action, result: any) {
    return result;
  }
}

/**
 * 全局拦截器
 * 请求响应拦截器: 用于更改或替换返回给客户端的数据。
 */
@Interceptor()
export class AuthInterceptor implements InterceptorInterface {
  intercept(action: Action, result: any) {
    //console.log('ac: ', action);
    
    return result;
  }
}
